﻿<%@ Page Language="C#" MasterPageFile="~/Shared/DialogPage.Master" AutoEventWireup="true" CodeBehind="SalesBudgetPutEdit.aspx.cs" Inherits="Runda.CMS.Portal.Budget.SalesBudgetPutEdit" StylesheetTheme="GlobleTheme" %>

<%@ Register Assembly="RadGrid.Net2" Namespace="Telerik.WebControls" TagPrefix="rad" %>
<%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="radC" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
  <link href="../Content/global.css" rel="stylesheet" type="text/css" /> 
    <link href="../Content/Find/find.css" rel="stylesheet" type="text/css" />
    <link href="../Content/jquery.autocomplete.css" rel="stylesheet" type="text/css" />
    <script src="../Content/jquery-1.3.2.js" type="text/javascript"></script>

    <script src="../Content/jquery.numeral.js" type="text/javascript"></script>
      <link href="../Content/global.css" rel="stylesheet" type="text/css" /> 
    <link href="../Content/Find/find.css" rel="stylesheet" type="text/css" />
    <script src="../Content/jquery-1.3.2.js" type="text/javascript"></script>

    <script src="../Content/jquery.numeral.js" type="text/javascript"></script>
    <script src="../Content/jquery.autocomplete.js" type="text/javascript"></script>
    <script type="text/javascript">
        $(function() {
            InitPage();
        })

        function InitPage() {
            $('#<%=txtQ1Count.ClientID %>').integer();
            $('#<%=txtQ2Count.ClientID %>').integer();
            $('#<%=txtQ3Count.ClientID %>').integer();
            $('#<%=txtQ4Count.ClientID %>').integer();
            $('#<%=txtQ1Amount.ClientID %>').numeral();
            $('#<%=txtQ2Amount.ClientID %>').numeral();
            $('#<%=txtQ3Amount.ClientID %>').numeral();
            $('#<%=txtQ4Amount.ClientID %>').numeral();
            $('#<%=txtQ1RentAmount.ClientID %>').numeral();
            $('#<%=txtQ2RentAmount.ClientID %>').numeral();
            $('#<%=txtQ3RentAmount.ClientID %>').numeral();
            $('#<%=txtQ4RentAmount.ClientID %>').numeral();

            $('#<%=txtSalesBudget1_F.ClientID %>').numeral();
            $('#<%=txtSalesBudget1_T.ClientID %>').numeral();
            $('#<%=txtReward1.ClientID %>').numeral();
            $('#<%=txtSalesBudget2_F.ClientID %>').numeral();
            $('#<%=txtSalesBudget2_T.ClientID %>').numeral();
            $('#<%=txtReward2.ClientID %>').numeral();
            $('#<%=txtSalesBudget3_F.ClientID %>').numeral();
            $('#<%=txtSalesBudget3_T.ClientID %>').numeral();
            $('#<%=txtReward3.ClientID %>').numeral();
            $('#<%=txtSalesBudget4_F.ClientID %>').numeral();
            $('#<%=txtSalesBudget4_T.ClientID %>').numeral();
            $('#<%=txtReward4.ClientID %>').numeral();
            $('#<%=txtSalesBudget5_F.ClientID %>').numeral();
            $('#<%=txtSalesBudget5_T.ClientID %>').numeral();
            $('#<%=txtReward5.ClientID %>').numeral();
            $('#<%=txtSalesBudget6_F.ClientID %>').numeral();
            $('#<%=txtSalesBudget6_T.ClientID %>').numeral();
            $('#<%=txtFine1.ClientID %>').numeral();
            $('#<%=txtSalesBudget7_F.ClientID %>').numeral();
            $('#<%=txtSalesBudget7_T.ClientID %>').numeral();
            $('#<%=txtFine2.ClientID %>').numeral();
            $('#<%=txtSalesBudget8_F.ClientID %>').numeral();
            $('#<%=txtSalesBudget8_T.ClientID %>').numeral();
            $('#<%=txtFine3.ClientID %>').numeral();
            $('#<%=txtSalesBudget9_F.ClientID %>').numeral();
            $('#<%=txtSalesBudget9_T.ClientID %>').numeral();
            $('#<%=txtFine4.ClientID %>').numeral();
            $('#<%=txtSalesBudget10_F.ClientID %>').numeral();
            $('#<%=txtSalesBudget10_T.ClientID %>').numeral();
            $('#<%=txtFine5.ClientID %>').numeral();
             

            //设置readonly属性 
            $('#<%=txtTotalCount.ClientID %>').attr('readonly', 'readonly');
            $('#<%=txtTotalAmount.ClientID %>').attr('readonly', 'readonly');
            $('#<%=txtTotalRentAmount.ClientID %>').attr('readonly', 'readonly');

            $('#<%=txtQ1Count.ClientID %>').change(function() {
                var Q1Count = 0;
                Q1Count = $('#<%=txtQ1Count.ClientID %>').val() == '' ? 0 : ($('#<%=txtQ1Count.ClientID %>').val() * 1);
                
                var Q2Count = 0;
                Q2Count = $('#<%=txtQ2Count.ClientID %>').val() == '' ? 0 : ($('#<%=txtQ2Count.ClientID %>').val() * 1);

                var Q3Count = 0;
                Q3Count = $('#<%=txtQ3Count.ClientID %>').val() == '' ? 0 : ($('#<%=txtQ3Count.ClientID %>').val() * 1);

                var Q4Count = 0;
                Q4Count = $('#<%=txtQ4Count.ClientID %>').val() == '' ? 0 : ($('#<%=txtQ4Count.ClientID %>').val() * 1);

                $('#<%=txtTotalCount.ClientID %>').val(Q1Count + Q2Count + Q3Count + Q4Count);
            });

            $('#<%=txtQ1Count.ClientID %>').change(function() {
                var Q1Count = 0;
                Q1Count = $('#<%=txtQ1Count.ClientID %>').val() == '' ? 0 : ($('#<%=txtQ1Count.ClientID %>').val() * 1);

                var Q2Count = 0;
                Q2Count = $('#<%=txtQ2Count.ClientID %>').val() == '' ? 0 : ($('#<%=txtQ2Count.ClientID %>').val() * 1);

                var Q3Count = 0;
                Q3Count = $('#<%=txtQ3Count.ClientID %>').val() == '' ? 0 : ($('#<%=txtQ3Count.ClientID %>').val() * 1);

                var Q4Count = 0;
                Q4Count = $('#<%=txtQ4Count.ClientID %>').val() == '' ? 0 : ($('#<%=txtQ4Count.ClientID %>').val() * 1);

                $('#<%=txtTotalCount.ClientID %>').val(Q1Count + Q2Count + Q3Count + Q4Count);
            });

            $('#<%=txtQ2Count.ClientID %>').change(function() {
                var Q1Count = 0;
                Q1Count = $('#<%=txtQ1Count.ClientID %>').val() == '' ? 0 : ($('#<%=txtQ1Count.ClientID %>').val() * 1);

                var Q2Count = 0;
                Q2Count = $('#<%=txtQ2Count.ClientID %>').val() == '' ? 0 : ($('#<%=txtQ2Count.ClientID %>').val() * 1);

                var Q3Count = 0;
                Q3Count = $('#<%=txtQ3Count.ClientID %>').val() == '' ? 0 : ($('#<%=txtQ3Count.ClientID %>').val() * 1);

                var Q4Count = 0;
                Q4Count = $('#<%=txtQ4Count.ClientID %>').val() == '' ? 0 : ($('#<%=txtQ4Count.ClientID %>').val() * 1);

                $('#<%=txtTotalCount.ClientID %>').val(Q1Count + Q2Count + Q3Count + Q4Count);
            });

            $('#<%=txtQ3Count.ClientID %>').change(function() {
                var Q1Count = 0;
                Q1Count = $('#<%=txtQ1Count.ClientID %>').val() == '' ? 0 : ($('#<%=txtQ1Count.ClientID %>').val() * 1);

                var Q2Count = 0;
                Q2Count = $('#<%=txtQ2Count.ClientID %>').val() == '' ? 0 : ($('#<%=txtQ2Count.ClientID %>').val() * 1);

                var Q3Count = 0;
                Q3Count = $('#<%=txtQ3Count.ClientID %>').val() == '' ? 0 : ($('#<%=txtQ3Count.ClientID %>').val() * 1);

                var Q4Count = 0;
                Q4Count = $('#<%=txtQ4Count.ClientID %>').val() == '' ? 0 : ($('#<%=txtQ4Count.ClientID %>').val() * 1);

                $('#<%=txtTotalCount.ClientID %>').val(Q1Count + Q2Count + Q3Count + Q4Count);
            });

            $('#<%=txtQ4Count.ClientID %>').change(function() {
                var Q1Count = 0;
                Q1Count = $('#<%=txtQ1Count.ClientID %>').val() == '' ? 0 : ($('#<%=txtQ1Count.ClientID %>').val() * 1);

                var Q2Count = 0;
                Q2Count = $('#<%=txtQ2Count.ClientID %>').val() == '' ? 0 : ($('#<%=txtQ2Count.ClientID %>').val() * 1);

                var Q3Count = 0;
                Q3Count = $('#<%=txtQ3Count.ClientID %>').val() == '' ? 0 : ($('#<%=txtQ3Count.ClientID %>').val() * 1);

                var Q4Count = 0;
                Q4Count = $('#<%=txtQ4Count.ClientID %>').val() == '' ? 0 : ($('#<%=txtQ4Count.ClientID %>').val() * 1);

                $('#<%=txtTotalCount.ClientID %>').val(Q1Count + Q2Count + Q3Count + Q4Count);
            });

            $('#<%=txtQ1Amount.ClientID %>').change(function() {
                var Q1Amount = 0;
                Q1Amount = $('#<%=txtQ1Amount.ClientID %>').val() == '' ? 0 : ($('#<%=txtQ1Amount.ClientID %>').val() * 1);

                var Q2Amount = 0;
                Q2Amount = $('#<%=txtQ2Amount.ClientID %>').val() == '' ? 0 : ($('#<%=txtQ2Amount.ClientID %>').val() * 1);

                var Q3Amount = 0;
                Q3Amount = $('#<%=txtQ3Amount.ClientID %>').val() == '' ? 0 : ($('#<%=txtQ3Amount.ClientID %>').val() * 1);

                var Q4Amount = 0;
                Q4Amount = $('#<%=txtQ4Amount.ClientID %>').val() == '' ? 0 : ($('#<%=txtQ4Amount.ClientID %>').val() * 1);

                $('#<%=txtTotalAmount.ClientID %>').val(Q1Amount + Q2Amount + Q3Amount + Q4Amount);
            });

            $('#<%=txtQ2Amount.ClientID %>').change(function() {
                var Q1Amount = 0;
                Q1Amount = $('#<%=txtQ1Amount.ClientID %>').val() == '' ? 0 : ($('#<%=txtQ1Amount.ClientID %>').val() * 1);

                var Q2Amount = 0;
                Q2Amount = $('#<%=txtQ2Amount.ClientID %>').val() == '' ? 0 : ($('#<%=txtQ2Amount.ClientID %>').val() * 1);

                var Q3Amount = 0;
                Q3Amount = $('#<%=txtQ3Amount.ClientID %>').val() == '' ? 0 : ($('#<%=txtQ3Amount.ClientID %>').val() * 1);

                var Q4Amount = 0;
                Q4Amount = $('#<%=txtQ4Amount.ClientID %>').val() == '' ? 0 : ($('#<%=txtQ4Amount.ClientID %>').val() * 1);

                $('#<%=txtTotalAmount.ClientID %>').val(Q1Amount + Q2Amount + Q3Amount + Q4Amount);
            });

            $('#<%=txtQ3Amount.ClientID %>').change(function() {
                var Q1Amount = 0;
                Q1Amount = $('#<%=txtQ1Amount.ClientID %>').val() == '' ? 0 : ($('#<%=txtQ1Amount.ClientID %>').val() * 1);

                var Q2Amount = 0;
                Q2Amount = $('#<%=txtQ2Amount.ClientID %>').val() == '' ? 0 : ($('#<%=txtQ2Amount.ClientID %>').val() * 1);

                var Q3Amount = 0;
                Q3Amount = $('#<%=txtQ3Amount.ClientID %>').val() == '' ? 0 : ($('#<%=txtQ3Amount.ClientID %>').val() * 1);

                var Q4Amount = 0;
                Q4Amount = $('#<%=txtQ4Amount.ClientID %>').val() == '' ? 0 : ($('#<%=txtQ4Amount.ClientID %>').val() * 1);

                $('#<%=txtTotalAmount.ClientID %>').val(Q1Amount + Q2Amount + Q3Amount + Q4Amount);
            });

            $('#<%=txtQ4Amount.ClientID %>').change(function() {
                var Q1Amount = 0;
                Q1Amount = $('#<%=txtQ1Amount.ClientID %>').val() == '' ? 0 : ($('#<%=txtQ1Amount.ClientID %>').val() * 1);

                var Q2Amount = 0;
                Q2Amount = $('#<%=txtQ2Amount.ClientID %>').val() == '' ? 0 : ($('#<%=txtQ2Amount.ClientID %>').val() * 1);

                var Q3Amount = 0;
                Q3Amount = $('#<%=txtQ3Amount.ClientID %>').val() == '' ? 0 : ($('#<%=txtQ3Amount.ClientID %>').val() * 1);

                var Q4Amount = 0;
                Q4Amount = $('#<%=txtQ4Amount.ClientID %>').val() == '' ? 0 : ($('#<%=txtQ4Amount.ClientID %>').val() * 1);

                $('#<%=txtTotalAmount.ClientID %>').val(Q1Amount + Q2Amount + Q3Amount + Q4Amount);
            });

           $('#<%=txtQ1RentAmount.ClientID %>').change(function() {
                var Q1RentAmount = 0;
                Q1RentAmount = $('#<%=txtQ1RentAmount.ClientID %>').val() == '' ? 0 : ($('#<%=txtQ1RentAmount.ClientID %>').val() * 1);

                var Q2RentAmount = 0;
                Q2RentAmount = $('#<%=txtQ2RentAmount.ClientID %>').val() == '' ? 0 : ($('#<%=txtQ2RentAmount.ClientID %>').val() * 1);

                var Q3RentAmount = 0;
                Q3RentAmount = $('#<%=txtQ3RentAmount.ClientID %>').val() == '' ? 0 : ($('#<%=txtQ3RentAmount.ClientID %>').val() * 1);

                var Q4RentAmount = 0;
                Q4RentAmount = $('#<%=txtQ4RentAmount.ClientID %>').val() == '' ? 0 : ($('#<%=txtQ4RentAmount.ClientID %>').val() * 1);


                $('#<%=txtTotalRentAmount.ClientID %>').val(Q1RentAmount + Q2RentAmount + Q3RentAmount + Q4RentAmount);
            });
            $('#<%=txtQ2RentAmount.ClientID %>').change(function() {
                var Q1RentAmount = 0;
                Q1RentAmount = $('#<%=txtQ1RentAmount.ClientID %>').val() == '' ? 0 : ($('#<%=txtQ1RentAmount.ClientID %>').val() * 1);

                var Q2RentAmount = 0;
                Q2RentAmount = $('#<%=txtQ2RentAmount.ClientID %>').val() == '' ? 0 : ($('#<%=txtQ2RentAmount.ClientID %>').val() * 1);

                var Q3RentAmount = 0;
                Q3RentAmount = $('#<%=txtQ3RentAmount.ClientID %>').val() == '' ? 0 : ($('#<%=txtQ3RentAmount.ClientID %>').val() * 1);

                var Q4RentAmount = 0;
                Q4RentAmount = $('#<%=txtQ4RentAmount.ClientID %>').val() == '' ? 0 : ($('#<%=txtQ4RentAmount.ClientID %>').val() * 1);


                $('#<%=txtTotalRentAmount.ClientID %>').val(Q1RentAmount + Q2RentAmount + Q3RentAmount + Q4RentAmount);
            });
            $('#<%=txtQ3RentAmount.ClientID %>').change(function() {
                var Q1RentAmount = 0;
                Q1RentAmount = $('#<%=txtQ1RentAmount.ClientID %>').val() == '' ? 0 : ($('#<%=txtQ1RentAmount.ClientID %>').val() * 1);

                var Q2RentAmount = 0;
                Q2RentAmount = $('#<%=txtQ2RentAmount.ClientID %>').val() == '' ? 0 : ($('#<%=txtQ2RentAmount.ClientID %>').val() * 1);

                var Q3RentAmount = 0;
                Q3RentAmount = $('#<%=txtQ3RentAmount.ClientID %>').val() == '' ? 0 : ($('#<%=txtQ3RentAmount.ClientID %>').val() * 1);

                var Q4RentAmount = 0;
                Q4RentAmount = $('#<%=txtQ4RentAmount.ClientID %>').val() == '' ? 0 : ($('#<%=txtQ4RentAmount.ClientID %>').val() * 1);


                $('#<%=txtTotalRentAmount.ClientID %>').val(Q1RentAmount + Q2RentAmount + Q3RentAmount + Q4RentAmount);
            });
            $('#<%=txtQ4RentAmount.ClientID %>').change(function() {
                var Q1RentAmount = 0;
                Q1RentAmount = $('#<%=txtQ1RentAmount.ClientID %>').val() == '' ? 0 : ($('#<%=txtQ1RentAmount.ClientID %>').val() * 1);

                var Q2RentAmount = 0;
                Q2RentAmount = $('#<%=txtQ2RentAmount.ClientID %>').val() == '' ? 0 : ($('#<%=txtQ2RentAmount.ClientID %>').val() * 1);

                var Q3RentAmount = 0;
                Q3RentAmount = $('#<%=txtQ3RentAmount.ClientID %>').val() == '' ? 0 : ($('#<%=txtQ3RentAmount.ClientID %>').val() * 1);

                var Q4RentAmount = 0;
                Q4RentAmount = $('#<%=txtQ4RentAmount.ClientID %>').val() == '' ? 0 : ($('#<%=txtQ4RentAmount.ClientID %>').val() * 1);


                $('#<%=txtTotalRentAmount.ClientID %>').val(Q1RentAmount + Q2RentAmount + Q3RentAmount + Q4RentAmount);
            });
 
        }

        $(function() {
            $("#<%=txtCustomer.ClientID %>").autocomplete('<%=this.Page.ResolveClientUrl("~/Services/PortalService.asmx/GetCusomerAutoComplete") %>', {
                httpMethod: "POST", //使用POST调用WebService 
                dataType: 'xml', //返回数据类型为XML 
                minchar: 1, //最小响应字符数量
                selectFirst: false, //默认不选中第1条
                max: 15,
                scroll: false,
                //格式化选项,由于WebService返回的数据是JSON格式,现在要转成HTML以TABLE形式显示 
                formatItem: function(row, i, max) {
                    var obj = eval("(" + row + ")"); //将JSON转换成对象
                    var item = "<table  id='auto" + i + "' style='width:100%;'><tr><td align='left' style='color:green;'>" + obj.name + "</td> <td align='left' style='display:none'>" + obj.value + "</td> <td align='left' style='display:none'>" + obj.salesman + "</td></tr></table>";
                    return item;
                },
                //格式化结果,当选中时返回具体的值 
                formatResult: function(row, i, max) {
                    var obj = eval("(" + row + ")");
                    return obj.name;
                }
            });
            $("#<%=txtCustomer.ClientID %>").result(function(event, data, formatted) {
                var obj = eval("(" + data + ")");

                document.getElementById('<%=hidSalesAgencyID.ClientID%>').value = obj.value;

            });

        });
        
        function FloatTo2(ftValue) {
            return Math.round(ftValue * 100) / 100;
        }
    </script>
    
  <script type="text/javascript">
      function comboLoad(sender, eventArgs) {
          sender.set_text(sender.get_items().getItem(0).get_value());
      }

      function nodeClicking(sender, args) {

          var comboBox = $find('ctl00_ContentPlaceHolder1_RadComboBox_ProdType');
          var node = args.get_node()
          var Text1 = document.getElementById('ctl00_ContentPlaceHolder1_Text1');
          var SelectType = document.getElementById('ctl00_ContentPlaceHolder1_txt_SelectType');
          SelectType.value = args.get_node().get_text();
          Text1.value = args.get_node().get_value();
          
          comboBox.set_text(node.get_text());
          comboBox.trackChanges();
          comboBox.get_items().getItem(0).set_value(node.get_text());
          comboBox.commitChanges();

          comboBox.hideDropDown();
      }

      function StopPropagation(e) {
          if (!e) {
              e = window.event;
          }

          e.cancelBubble = true;
      }

      function OnClientDropDownOpenedHandler(sender, eventArgs) {
          var tree = sender.get_items().getItem(0).findControl("RadTreeView_ProdType");
          var selectedNode = tree.get_selectedNode();
          if (selectedNode) {
              selectedNode.scrollIntoView();
          }
      }
        </script>
  <style type="text/css">
    .tabnew{width:100%;height:100%;}
    .mnuBar
    {
	    color: #ffffff;
	    height: 23px;
	    width: 100%;
	    background-color: #7288AC;
	    border: #abc0e7 1px solid;
	    border-right: #00377a 1px solid;
	    border-bottom: #00377a 1px solid;
    }
 img{ border:none;}
.FolderTable{ width:90px; height:22px; color:#fff; text-decoration:none;}
 .FolderTable a:link{ width:90px; height:22px; color:#fff; text-decoration:none;}
.FolderTable a:visited{ width:90px; height:22px;  border:#00377a 1px solid; color:#fff; text-decoration:none;}
.FolderTable a:hover{ width:90px; height:22px;  border:#00377a 1px solid; background-color:64799c; color:#fff; text-decoration:none;}
    </style>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
 <asp:ScriptManager ID="ScriptManager1" runat="server">
        </asp:ScriptManager>
<div class="mnuBar">
    <img hspace="3" src="../Content/Menu/mnu_vSpacer.gif" alt=""/>
    <span style="vertical-align:middle;cursor:pointer" class="FolderTable">
        <asp:LinkButton ID="lnkbtnSaveAndClose" runat="server" 
        onclick="lnkbtnSaveAndClose_Click"><img class="mnuBtn" src="../Content/Menu/SaveClose_16_blue.gif" style="margin-top:1px" />保存&amp;关闭</asp:LinkButton>
    </span>
    <span style="vertical-align:middle;cursor:pointer" class="FolderTable">
        <asp:LinkButton ID="lnkbtnSaveAndCloseEx" runat="server" onclick="lnkbtnSaveAndCloseEx_Click"><img class="mnuBtn" src="../Content/Menu/SaveClose_16_blue.gif" style="margin-top:1px" />保存奖惩</asp:LinkButton>
    </span>
    <img src="../Content/Menu/separator.gif" alt=""/>
    <span title="关闭" onclick="window.close();"  class="FolderTable"><img class="mnuBtn" src="../Content/Menu/Close_16_blue.gif" style="margin-top:5px"/><span class="mnuBtn">关闭</span></span>                    
</div>

<div class="Container">
    <div style="width:60%;float:left;">
        <table id="Table1" class="find" cellspacing="0" cellpadding="0" border="0"> 
            <tbody>
                <tr height="23">
                    <td class="wizHead" colspan="7">
                        <table style="table-layout: fixed; font-size: 9pt" cellspacing="0" cellpadding="0" width="100%" height="100%">
                            <colgroup>
                                <col>
                                <col width="60">
                                <col width="60"> 
                                <tr><td style="color:#ffffff"><b>投放预算基本内容</b></td></tr>
                        </table>
                    </td>
                </tr>
                <tr id="Tr1" >
                    <td class="wizBox1" colspan="7">
                        <table id="Table2" style="table-layout: fixed; font-size: 9pt" height="100%" cellspacing="2" cellpadding="2" width="100%">
                            <col width="200" align="right"> 
                            <col> 
                            <tr>
                            <td align="right"  style="width:10%">客户：</td>
                                <td  colspan="3">
                                    <asp:Label ID="lblCustomername" runat="server" Text="Label" ForeColor="#0033CC"></asp:Label>
                                
                               </td>
                            </tr> 
                            <tr>
                            <td align="right"  style="width:10%">经销商：</td>
                                <td  colspan="3">
                                <asp:TextBox ID="txtCustomer" runat="server" Width="400px"></asp:TextBox>
                                <asp:CheckBox ID="chbSaleAgencyIsTrue" runat="server" Text="已确认" />
                               </td>
                            </tr> 
                            <tr style="height:60px">
                            <td>备注</td>
                                <td colspan="3">
                                    <asp:TextBox ID="txtRemark" runat="server" MaxLength="200" Height="60px" TextMode="MultiLine"></asp:TextBox>（限200字以内）
                                </td>
                            </tr>
                            <tr>
                            <td class="wizHead" align="center" colspan="2" style="color:#ffffff">试剂销售预算</td>
                            <td class="wizHead" align="center" colspan="2" style="color:#ffffff">仪器投放预算</td>
                            </tr> 
                            <tr>
                                <td>
                                    产品类别：
                                </td>
                                <td> 
                                    <radC:RadComboBox ID="RadComboBox_ProdType" Runat="server" ShowToggleImage="True" Skin="WebBlue"
                    Style="vertical-align: middle;" OnClientLoad="comboLoad" OnClientDropDownOpened="OnClientDropDownOpenedHandler">
                                        <ItemTemplate>
                                             <div id="div1">
                                                <radC:RadTreeView ID="RadTreeView_ProdType" runat="server" Skin="Office2007" Height="140px"
                                                    OnClientNodeClicking="nodeClicking">
                                                </radC:RadTreeView>
                                            </div>
                                        </ItemTemplate>
                                         <Items>
                                            <radC:RadComboBoxItem runat="server" />
                                        </Items>
                                    </radC:RadComboBox>
                <input id="txt_SelectType" type="text" runat="server"   style="display: none" />

                <script type="text/javascript">
                    var div1 = document.getElementById("div1");
                    div1.onclick = StopPropagation;
                </script>

                <input id="Text1" type="hidden" value="" runat="server" />
                                </td>                                 
                                <td align="right"> 
                                    仪器型号：<td> 
                                                    <asp:DropDownList ID="ddlInstrumentModel" runat="server">
                                                    </asp:DropDownList>
                                                </td>                                 
                            </tr>
                            <tr style="height:25px">
                            <td></td><td></td>
                                <td align="right">
                                    出资方：</td>
                                <td>
                                    <asp:RadioButtonList ID="rbCostType" runat="server" RepeatColumns="2">
                                        <asp:ListItem Value="1" Selected="True">公司</asp:ListItem>
                                        <asp:ListItem Value="2">厂家</asp:ListItem>
                                    </asp:RadioButtonList>
                                </td>
                            </tr>
                            <tr style="height:25px">
                            <td>第一季度销售金额：</td><td>
                                    <asp:TextBox ID="txtQ1Amount" runat="server"></asp:TextBox>
                                    
                                </td>
                                <td align="right">
                                    投放数量：</td>
                                <td>
                                    <asp:TextBox ID="txtQ1Count" runat="server"></asp:TextBox>
                                </td>
                            </tr>
                            <tr style="height:25px">
                            <td align="right">
                                    租金：</td>
                                <td>
                                    <asp:TextBox ID="txtQ1RentAmount" runat="server"></asp:TextBox></td>
                            </tr>
                             <tr style="height:25px">
                            <td>第二季度销售金额：</td><td>
                                 <asp:TextBox ID="txtQ2Amount" runat="server"></asp:TextBox>
                                 </td>
                                 <td align="right">投放数量：</td>
                                 <td>
                                    <asp:TextBox ID="txtQ2Count" runat="server"></asp:TextBox> 
                                 </td>
                            </tr>
                           <tr style="height:25px">
                            <td align="right">
                                    租金：</td>
                                <td>
                                    <asp:TextBox ID="txtQ2RentAmount" runat="server"></asp:TextBox></td>
                            </tr>
                             <tr style="height:25px">
                            <td>第三季度销售金额：</td><td>
                                 <asp:TextBox ID="txtQ3Amount" runat="server"></asp:TextBox>
                                                                                        
                             </td>
                                 <td align="right">投放数量：</td>
                                 <td>
                                     <asp:TextBox ID="txtQ3Count" runat="server"></asp:TextBox>
                                                                                        
                             </td>
                            </tr>
                            <tr style="height:25px">
                                <td align="right">
                                    租金：</td>
                                <td>
                                    <asp:TextBox ID="txtQ3RentAmount" runat="server"></asp:TextBox></td>
                            </tr>
                             <tr style="height:25px">
                            <td>第四季度销售金额：</td><td>
                                 <asp:TextBox ID="txtQ4Amount" runat="server"></asp:TextBox>
                                 </td>
                                 <td align="right">
                                     投放数量：</td>
                                 <td>
                                     <asp:TextBox ID="txtQ4Count" runat="server"></asp:TextBox>
                                 </td>
                            </tr>
                              <tr style="height:25px">
                                <td align="right">
                                    租金：</td>
                                <td>
                                    <asp:TextBox ID="txtQ4RentAmount" runat="server"></asp:TextBox></td>
                            </tr>
                             <tr style="height:25px">
                            <td>销售总金额：</td><td>
                                 <asp:TextBox ID="txtTotalAmount" runat="server" ReadOnly="true"  BackColor="#DBDBDB" BorderColor="#DBDBDB"></asp:TextBox>
                                 </td>
                                 <td align="right">
                                     投放总数量：</td>
                                 <td>
                                     <asp:TextBox ID="txtTotalCount" runat="server" ReadOnly="true"  BackColor="#DBDBDB" BorderColor="#DBDBDB"></asp:TextBox>
                                 </td>
                            </tr>
                             <tr style="height:25px">
                                 <td align="right">
                                     总租金：</td>
                                 <td>
                                     <asp:TextBox ID="txtTotalRentAmount" runat="server" ReadOnly="true"  BackColor="#DBDBDB" BorderColor="#DBDBDB"></asp:TextBox></td>
                            </tr>
                        </table>
                    </td>
                </tr>
            </tbody>
        </table>   
    </div>
    <div style="width:auto;float:left;margin-left:5px;">
        <table id="appFind" class="find" cellspacing="0" cellpadding="0" border="0"> 
            <tbody>
                <tr height="23">
                    <td class="wizHead" colspan="7">
                        <table style="table-layout: fixed; font-size: 9pt" cellspacing="0" cellpadding="0" width="100%" height="100%">
                                <tr><td style="color:#ffffff"><b>预算详细</b></td></tr>
                        </table>
                    </td>
                </tr>
                <tr id="__appFind_trQuery">
                    <td class="wizBox1" colspan="7">
                        <table id="__appFind_tbQuery1" style="table-layout: fixed; font-size: 9pt" height="100%" cellspacing="0" cellpadding="0" width="100%">
                            <col align="left">  
                            <tr style="height:25px">
                                <td>
                                    <asp:Button ID="btnCalculate" runat="server" Text="按月分摊" CssClass="button" 
                                        onclick="btnCalculate_Click"/>
                                </td> </tr>
                                <tr>
                                <td> 
                                <rad:RadGrid runat="server" ID="gridItems" Skin="OCM" AutoGenerateColumns="False" AllowSorting="false" GridLines="None" EnableAJAX="True" EnableAJAXLoadingTemplate="True" Width="100%" AllowPaging="false">
                                <AJAXLoadingTemplate>
                                    加载中...
                                </AJAXLoadingTemplate>
                                <ClientSettings EnableClientKeyValues="true">
                                    <Selecting AllowRowSelect="true" /> 
                                </ClientSettings>
                                <MasterTableView DataKeyNames="MonthBugetID">
                                    <Columns>
                                        <rad:GridTemplateColumn HeaderText="年月">
                                            <ItemTemplate>
                                                <asp:Label ID="txtBudgetMonth" runat="server" Width="100%" Text='<%#Eval("BudgetMonth") %>'></asp:Label>
                                            </ItemTemplate>
                                        </rad:GridTemplateColumn>
                                        <rad:GridTemplateColumn HeaderText="试剂金额">
                                            <ItemTemplate>
                                                <asp:TextBox ID="txtAmount" runat="server" Width="100%" CssClass="input" Text='<%#string.Format("{0:N}", Eval("Amount")) %>'></asp:TextBox>
                                            </ItemTemplate>
                                        </rad:GridTemplateColumn>
                                        <rad:GridTemplateColumn HeaderText="仪器租金">
                                            <ItemTemplate>
                                                <asp:TextBox ID="txtRentAmount" runat="server" Width="100%" CssClass="input" Text='<%#string.Format("{0:N}", Eval("RentAmount")) %>'></asp:TextBox>
                                            </ItemTemplate>
                                        </rad:GridTemplateColumn>
                                        <rad:GridTemplateColumn HeaderText="投放数量">
                                            <ItemTemplate>
                                                <asp:TextBox ID="txtCount" runat="server" Width="100%" CssClass="input" Text='<%#Eval("Quantity") %>'></asp:TextBox>
                                            </ItemTemplate>
                                        </rad:GridTemplateColumn>
                                        
                                    </Columns>
                                </MasterTableView>
                            </rad:RadGrid>
                                </td>                                 
                            </tr>
                        </table>
                    </td>
                </tr>
            </tbody>
    </table>       
    </div>     
</div> 

<div class="Container">
     <table>
     <tr>
        <td style="width:500px;color:Green;">奖励标准</td>
        <td style="width:500px;color:Green;">惩罚标准</td>
     </tr>
     <tr>
     <td>
        <table>
        <tr>
            <td style="width:20px;">从</td>
            <td style="width:120px;"><asp:TextBox ID="txtSalesBudget1_F" runat="server" Width="100px"></asp:TextBox></td>
            <td style="width:20px;">到</td>
            <td style="width:120px;"><asp:TextBox ID="txtSalesBudget1_T" runat="server" Width="100px"></asp:TextBox></td>
            <td style="width:60px;" align="right">奖励：</td>
            <td style="width:120px;"><asp:TextBox ID="txtReward1" runat="server" Width="100px"></asp:TextBox></td>
        </tr>
        <tr>
            <td style="width:20px;">从</td>
            <td style="width:120px;"><asp:TextBox ID="txtSalesBudget2_F" runat="server" Width="100px"></asp:TextBox></td>
            <td style="width:20px;">到</td>
            <td style="width:120px;"><asp:TextBox ID="txtSalesBudget2_T" runat="server" Width="100px"></asp:TextBox></td>
            <td style="width:60px;" align="right">奖励：</td>
            <td style="width:120px;"><asp:TextBox ID="txtReward2" runat="server" Width="100px"></asp:TextBox></td>
        </tr>
        <tr>
            <td style="width:20px;">从</td>
            <td style="width:120px;"><asp:TextBox ID="txtSalesBudget3_F" runat="server" Width="100px"></asp:TextBox></td>
            <td style="width:20px;">到</td>
            <td style="width:120px;"><asp:TextBox ID="txtSalesBudget3_T" runat="server" Width="100px"></asp:TextBox></td>
            <td style="width:60px;" align="right">奖励：</td>
            <td style="width:120px;"><asp:TextBox ID="txtReward3" runat="server" Width="100px"></asp:TextBox></td>
        </tr>
        <tr>
            <td style="width:20px;">从</td>
            <td style="width:120px;"><asp:TextBox ID="txtSalesBudget4_F" runat="server" Width="100px"></asp:TextBox></td>
            <td style="width:20px;">到</td>
            <td style="width:120px;"><asp:TextBox ID="txtSalesBudget4_T" runat="server" Width="100px"></asp:TextBox></td>
            <td style="width:60px;" align="right">奖励：</td>
            <td style="width:120px;"><asp:TextBox ID="txtReward4" runat="server" Width="100px"></asp:TextBox></td>
        </tr>
        <tr>
            <td style="width:20px;">从</td>
            <td style="width:120px;"><asp:TextBox ID="txtSalesBudget5_F" runat="server" Width="100px"></asp:TextBox></td>
            <td style="width:20px;">到</td>
            <td style="width:120px;"><asp:TextBox ID="txtSalesBudget5_T" runat="server" Width="100px"></asp:TextBox></td>
            <td style="width:60px;" align="right">奖励：</td>
            <td style="width:120px;"><asp:TextBox ID="txtReward5" runat="server" Width="100px"></asp:TextBox></td>
        </tr>
        </table>
     </td>
     <td>
        <table>
        <tr>
            <td style="width:20px;">从</td>
            <td style="width:120px;"><asp:TextBox ID="txtSalesBudget6_F" runat="server" Width="100px"></asp:TextBox></td>
            <td style="width:20px;">到</td>
            <td style="width:120px;"><asp:TextBox ID="txtSalesBudget6_T" runat="server" Width="100px"></asp:TextBox></td>
            <td style="width:60px;" align="right">惩罚：</td>
            <td style="width:120px;"><asp:TextBox ID="txtFine1" runat="server" Width="100px"></asp:TextBox></td>
        </tr>
        <tr>
            <td style="width:20px;">从</td>
            <td style="width:120px;"><asp:TextBox ID="txtSalesBudget7_F" runat="server" Width="100px"></asp:TextBox></td>
            <td style="width:20px;">到</td>
            <td style="width:120px;"><asp:TextBox ID="txtSalesBudget7_T" runat="server" Width="100px"></asp:TextBox></td>
            <td style="width:60px;" align="right">惩罚：</td>
            <td style="width:120px;"><asp:TextBox ID="txtFine2" runat="server" Width="100px"></asp:TextBox></td>
        </tr>
        <tr>
            <td style="width:20px;">从</td>
            <td style="width:120px;"><asp:TextBox ID="txtSalesBudget8_F" runat="server" Width="100px"></asp:TextBox></td>
            <td style="width:20px;">到</td>
            <td style="width:120px;"><asp:TextBox ID="txtSalesBudget8_T" runat="server" Width="100px"></asp:TextBox></td>
            <td style="width:60px;" align="right">惩罚：</td>
            <td style="width:120px;"><asp:TextBox ID="txtFine3" runat="server" Width="100px"></asp:TextBox></td>
        </tr>
        <tr>
            <td style="width:20px;">从</td>
            <td style="width:120px;"><asp:TextBox ID="txtSalesBudget9_F" runat="server" Width="100px"></asp:TextBox></td>
            <td style="width:20px;">到</td>
            <td style="width:120px;"><asp:TextBox ID="txtSalesBudget9_T" runat="server" Width="100px"></asp:TextBox></td>
            <td style="width:60px;" align="right">惩罚：</td>
            <td style="width:120px;"><asp:TextBox ID="txtFine4" runat="server" Width="100px"></asp:TextBox></td>
        </tr>
        <tr>
            <td style="width:20px;">从</td>
            <td style="width:120px;"><asp:TextBox ID="txtSalesBudget10_F" runat="server" Width="100px"></asp:TextBox></td>
            <td style="width:20px;">到</td>
            <td style="width:120px;"><asp:TextBox ID="txtSalesBudget10_T" runat="server" Width="100px"></asp:TextBox></td>
            <td style="width:60px;" align="right">惩罚：</td>
            <td style="width:120px;"><asp:TextBox ID="txtFine5" runat="server" Width="100px"></asp:TextBox></td>
        </tr>
        </table>
     </td>
     </tr>
     
     </table>
 </div> 
 
<div class="Container">
     <table>
     <tr><td colspan="2" style="color:Green;">操作说明</td></tr>
     <tr>
     <td style="width:80px">备注：</td>
     <td style="width:1000px">尽量简明扼要，限200字。</td>
     </tr><tr>
     <td style="width:80px">经销商：</td>
     <td style="width:1000px">如属分销方式，请填列。</td>
     </tr><tr>
     <td style="width:80px">金额：</td>
     <td style="width:1000px">以元为单位。</td>
     </tr><tr>
     <td style="width:80px">按月分摊：</td>
     <td style="width:1000px">填写试剂金额和投放数量后，点击按月分摊，并手工输入分摊数，并保证与季度数一致。</td>
     </tr><tr>
     <td style="width:80px">投放说明：</td>
     <td style="width:1000px">租金：该仪器投放时，签署租赁合同中涉及的租金收入。</td>
     </tr>
     <tr>
     <td colspan="2">投放一台仪器，如在多条产品线中产生试剂收入，则分多张投放预算编制单进行编制,举例如下：</td></tr>
     <tr>
     <td colspan="2">投放一台C8000，产生积水生化试剂50万、华臣生化试剂20万，则第一张预算编制单中投放数据为C8000一台、积水生化试剂50万，第二张预算编制单中的仪器投放型号为C8000零台、华臣生化试剂20万，请在备注栏注明该情况。</td></tr>
     </table>
 </div>
        <input type="hidden" id="hidSalesAgencyID" runat="server" />
</asp:Content>
